package com.ChenYaRou.www.dao;


import com.ChenYaRou.www.po.Shop;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 86183
 */
public interface ShopDao {
    /**
     * 新建店铺
     * @param shop 新店铺
     * @return 更新条数
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int insert(Shop shop) throws IllegalAccessException, SQLException;

    /**
     * 更新shop
     * @param newShop 新赋值内容
     * @param oldShop 更新的店铺
     * @return 更新条数
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int update(Shop newShop,Shop oldShop) throws IllegalAccessException, SQLException;


    /**
     * 查找shop集合
     * @param shop 条件shop
     * @return
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
     List<Shop> selectMore(Shop shop) throws IllegalAccessException, SQLException,
             NoSuchFieldException, InstantiationException;

    /**
     * 查找确切的单一shop
     * @param shop
     * @return 找到的shop
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
     Shop selectSingle(Shop shop) throws IllegalAccessException, SQLException, NoSuchFieldException, InstantiationException ;
    /**
     * 查找所有shop集合
     * @param shop 条件shop
     * @return
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
    List<Shop> selectAll(Shop shop) throws IllegalAccessException, SQLException,
            NoSuchFieldException, InstantiationException;
}
